<?php
function codigoCorrecto($email,$codigo)
	{
		$stringConsulta = "SELECT `nick` FROM `usuarios` WHERE `key` = :codigo AND `email` = :email AND `activo` = '0'";
		$arrayMapping = Array(':email'=>$email,':codigo'=>$codigo);
		$consulta = consulta($stringConsulta,$arrayMapping);
		return $consulta->fetch() != null;
	}
function activarCuenta($email)
	{
		$consulta = consulta("UPDATE `usuarios` SET `activo` = 1 WHERE `email` = :email",Array(':email'=>$email));
		return $consulta;
	}
?>